<extend name="Member/base" />
<block name="main">
<!--body-->			
<div class="kUi_content">
	<div class="loginbox">
		<div class="login_cont">
			<div class="login_bg">
				<div class="login_main">
					<div class="login_reg_mod">
						<form method="post" action="">
							<div class="login_title">用户登录</div>
							<div class="login-input">
								<div class="lable-text">
									<span>账号：</span>
								</div>
								<input name="username" type="text" class="putlog" placeholder="手机号/用户名/邮箱"/>
							</div>
							<div class="login-input">
								<div class="lable-text">
									<span>密码：</span>
									<!-- <a href="#" class="forget">忘记密码了?</a> -->
								</div>
								<input name="passwd" type="password" class="putlog pass" placeholder="请输入密码"/>
							</div>
							<div class="login-input">
								<div class="lable-text">
									<span>验证码：</span>
								</div>
								<div class="controls">
									<input type="text" id="inputPassword" class="putlog" placeholder="请输入验证码"  errormsg="请填写5位验证码" nullmsg="请填写验证码" datatype="*5-5" name="verify">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label"></label>
								<div class="controls control_code">
									<img class="verifyimg reloadverify" alt="点击切换" src="{:U('verify')}" style="cursor:pointer;">
								</div>
								<div class="controls Validform_checktip text-warning"></div>
							</div>
							<div class="Loginbtn">
								<button class="loginbtn">登录</button>
							</div>
						</form>
					</div>
				</div>
				<div class="pupbox">
					<div class="login_box">
						<div class="login_title">快速登录</div>
						<div class="login_btns">
							<a href="/xoauth/qq.html" class="qq_btn"><i class="login_qq_ico"></i>QQ帐号</a>
							<a href="/xoauth/sina.html" class="sina_weibo_btn"><i class="sina_weibo_ico"></i>新浪微博</a>
							<a href="/xoauth/weixin.html" class="weixin_btn"><i class="login_weixin_ico"></i>微信</a>
						</div>
						<div class="other_login">
							<span class="other_tit">其他合作帐号登录</span>
							<p class="other_tips">百家已不支持其他合作账号快速登录，如你已绑定手机号，请使用手机号登录，详情请<a href="#">联系客服</a>。</p>
						</div>
					</div> 
				</div> 
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
	$(document)
		$("form").submit(function(){
    		var self = $(this);
    		$.post(self.attr("action"), self.serialize(), success, "json");
    		return false;

    		function success(data){
    			if(data.status){
    				window.location.href = data.url;
    			} else {
    				self.find(".Validform_checktip").text(data.info);
    				//刷新验证码
    				$(".reloadverify").click();
    			}
    		}
    	});

		$(function(){
			var verifyimg = $(".verifyimg").attr("src");
            $(".reloadverify").click(function(){
                if( verifyimg.indexOf('?')>0){
                    $(".verifyimg").attr("src", verifyimg+'&random='+Math.random());
                }else{
                    $(".verifyimg").attr("src", verifyimg.replace(/\?.*$/,'')+'?'+Math.random());
                }
            });
		});
</script>
</block>